import pluginManager

def main():
    pManager = pluginManager.PluginManager()
    pManager.load_plugins(".\plugins")
    # 命令行
    parser = argparse.ArgumentParser(prog='mq', description='mq tool')
    subparsers = parser.add_subparsers(title='subcommands', help='commands')

    for plugin in pManager.pluginList:
        cmd = subparsers.add_parser(plugin.cmd, help=plugin.help)
        cmd.set_defaults(func=plugin.func)

        

if __name__ == "__main__":
    main()